package com.cg.config;

import org.springframework.data.redis.core.StringRedisTemplate;

/**
 * 获取token
 * @Author: cg
 * @Date: Create IN 2017/6/21 14:13
 * @Email: cg_666666@163.com
 */
public class TokenFactory {
    //从redis中取token
    public static  String getAccessToken(StringRedisTemplate stringRedisTemplate){
        if(stringRedisTemplate!=null){
            String access_token = stringRedisTemplate.opsForValue().get("ACCESS_TOKEN");
            return access_token;
        }
        return null;
    }
}
